home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / clpmk20.zip / CLPMK.DOC < prev    next >
Text File  |  1993-01-04  |  9KB  |  268 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.                                   CLPMK20.EXE
  29.  
  30.                                        a
  31.  
  32.                     C L I P P E R   M A K E   U T I L I T Y
  33.  
  34.                                  Version 2.0
  35.  
  36.             Copyright (c) 1989 by Bill Tansill: ALL RIGHTS RESERVED
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.         This file describes the utility program CLPMK20.EXE, version 2.0
  44.         created by Bill Tansill on April 20,1989.
  45.  
  46.         This utility is distributed on an "AS-IS" basis.  The author
  47.         may not be held liable for any special, consequential,
  48.         incidental or other damages or loss of income.  No warrenty
  49.         of merchantability or fitness for a particular use is made,
  50.         either express or implied.
  51.  
  52.         CLPMK20 is the copyrighted property of Bill Tansill.  You are    
  53.         granted a limited license to use CLPMK20, and to copy and
  54.         distribute it, provided that you agree to the following terms:
  55.  
  56.         1)  No fee may be charged for such copying and distribution.
  57.         2)  CLPMK20 may be distributed ONLY in its original, unmodified
  58.             form.
  59.         3)  This documentation file must accompany CLPMK20.
  60.         4)  This documentation file may not be altered. 
  61.  
  62.         Any voluntary contributions for the use of this program will
  63.         be appreciated, and should be sent to:
  64.  
  65.             Bill Tansill
  66.             P.O. Box 3196
  67.             Falls Church, Va. 22043
  68.  
  69.         A contribution of $15.00 is suggested.  
  70.  
  71.         You may NOT use CLPMK20 in a Commercial or Governmental 
  72.         environment without making a contribution.  An invoice is
  73.         provided at the end of this document for your convenience.
  74.  
  75.  
  76.  
  77.  
  78.  
  79.     How to use CLPMK20
  80.  
  81.         The CLPMK20 syntax is very simple: type "CLPMK20" and any valid
  82.         CLIPPER switches (-m -l -q etc.) from the DOS command line.
  83.         Be sure to separate each switch with a space.
  84.  
  85.         CLPMK20 will scan your subdirectory, and will call Clipper
  86.         to compile any .PRG files with a later time/date
  87.         stamp than the corresponding .OBJ file.  In the case of .CLP
  88.         files, each program listed in the .CLP file is tested against
  89.         the time/date stamp of the .OBJ file created when the .CLP
  90.         file was originally compiled.  If any programs whose names 
  91.         appear in the .CLP file (or the .CLP file itself) have a later
  92.         time/date stamp, the contents of the .CLP file are recompiled.
  93.  
  94.         When Clipper is run from within CLPMK20, no error messages will
  95.         appear on the screen.  Error messages, should there be any, 
  96.         are redirected to a file named "CLP.TXT".  If CLPMK20 signals
  97.         that a compile-time error has occurred, use your editor to
  98.         read the "CLP.TXT" file.  This file will contain all CLIPPER
  99.         generated error listings.
  100.  
  101.         Some assumptions apply.  First, CLPMK20 assumes that the
  102.         CLIPPER directory is in your PATH list.  The second
  103.         assumption is that you are calling CLPMK20 from the directory
  104.         containing the files that you wish to compile.  Finally, 
  105.         CLPMK20.EXE must be in a directory which is accessible from 
  106.         your PATH statement so that DOS can find it.
  107.  
  108.     Error Codes            
  109.  
  110.         The DOS ERRORLEVEL is used to indicate errors detected by 
  111.         CLPMK20.  The meaning of the error codes is as follows:
  112.  
  113.         ERRORLEVEL == 1 Indicates that there are no files which need
  114.         to be compiled.
  115.  
  116.         ERRORLEVEL == 2 Indicates that no source files were found.
  117.     
  118.         ERRORLEVEL == 3 Indicates that one or more errors occurred  
  119.         during compilation.
  120.  
  121.         ERRORLEVEL == 4 Indicates that the arguments in the CLIPPER
  122.         argument list were run together (-s-q) and need to be 
  123.         respecified (-s -q).
  124.  
  125.         ERRORLEVEL == 5 Indicates that there were one or more
  126.         unrecognized arguments specified (-z).
  127.  
  128.         ERRORLEVEL == 6 Indicates that there were one or more
  129.         program names listed in a .CLP file that were not present in
  130.         the directory when it was scanned.
  131.  
  132.  
  133.  
  134.  
  135.  
  136.         ERRORLEVEL == 7 Indicates that a program name was found in
  137.         two separate .CLP files.  This will lead to duplicate symbol
  138.         errors, and possibly flakey operation of your CLIPPER program.
  139.  
  140.  
  141.  
  142.  
  143.     CLPMK20 Limits
  144.  
  145.         Except for generating error codes 4 and 5, CLPMK20 performs NO
  146.         ERROR CHECKING.  If you use CLPMK20 -oC:\FOO, CLIPPER will fail
  147.         if the subdirectory FOO does not exist, but CLPMK20 will not
  148.         warn you in advance.  This was a conscious decision.  Since
  149.         CLIPPER provides error checking of its command line arguments,
  150.         I felt that error checking on my part was redundant.
  151.  
  152.         CLPMK20 will only COMPILE files.  It does NOT call the linker.
  153.         It is best used in a batch file environment, where the batch
  154.         file will call PLINK (or the linker of your choice if all files
  155.         were successfully compiled.  See example 1 for details.
  156.  
  157.         Example 1   && Suggested batch file configuration
  158.     
  159.             echo off
  160.             cls
  161.             CLPMK20 %1 %2 %3 %4 %5 %6 %7
  162.             if ERRORLEVEL == 7 goto DUPE_FL
  163.             if ERRORLEVEL == 6 goto MISSING_FL
  164.             if ERRORLEVEL == 5 goto WRONG_ARGS  
  165.             if ERRORLEVEL == 4 goto BAD_ARGS
  166.             if ERRORLEVEL == 3 goto BAD_FILES
  167.             if ERRORLEVEL == 2 goto NO_SOURCE
  168.             if ERRORLEVEL == 1 goto NO_NEW
  169.             for %%1 in (*.lnk) do PLINK86 @%%1
  170.             goto QUIT
  171.             :NO_NEW
  172.             echo There were no .PRG or .CLP files needing to be compiled.
  173.             goto QUIT
  174.             :NO_SOURCE
  175.             echo There are no .PRG or .CLP file in this directory.
  176.             goto QUIT
  177.             :BAD_FILES
  178.             echo There were one or more compilation errors.  Examine
  179.             echo CLP.TXT for details.
  180.             goto QUIT
  181.             :BAD_ARGS
  182.             echo One or more arguments are run together.  
  183.             goto QUIT
  184.             :WRONG_ARGS
  185.             echo One or more arguments are unrecognized.
  186.             goto QUIT
  187.             :MISSING_FL
  188.             echo One or more files contained in a .CLP file
  189.             echo do not exist in the current directory.
  190.             goto QUIT
  191.             :DUPE_FL
  192.             echo A program name was found in at least two .CLP
  193.             echo files.
  194.             goto QUIT
  195.             :QUIT
  196.             pause
  197.             cls
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.         This software depends on the DOS ERRORLEVEL.  Any
  206.         software that intercepts or resets ERRORLEVEL will conflict
  207.         with CLPMK20.  At this time I am aware that FOXNET behaves in
  208.         this manner.  Consequently, you must NOT run FOXNET while 
  209.         using CLPMK20.
  210.  
  211.         This program scans the directory containing your .PRG and
  212.         .CLP files and builds a simple binary tree for each type of
  213.         file.  I did this since a binary tree would allow me to
  214.         efficiently sort file names as they were encountered during
  215.         the directory scan, and search for file names as processing
  216.         continued.  I use recursive algorithms both to build and
  217.         process the trees.  If you have used Peter Nortons' DS (or any
  218.         similar) utility to sort your directory by filename, my recursion
  219.         algorithm will attempt to build a very unbalanced tree, and the
  220.         program will blow up with a stack overflow error.  To correct
  221.         this problem, simply resort your directory on a combination
  222.         of file date, file time, and file size.  The files will then
  223.         be unordered by name, and CLPMK20 should work fine (within
  224.         the limits of a 9k stack).
  225.  
  226.         I have tested CLPMK20 on a machine with 590K free ram, 275 
  227.         .PRG and 36 .CLP files with no problems.  CLPMK20 allocates 
  228.         memory dynamically for each .PRG and .CLP file it encounters 
  229.         during the directory scan (approx. 35 bytes for each file), 
  230.         so you may run into problems with a combination of greater
  231.         numbers of .PRG and .CLP files and less free ram.
  232.  
  233.         If anyone discovers any other problems, please mail me a
  234.         description of the problem at the listed P.O. box.
  235.  
  236.     Trademarks
  237.  
  238.         Clipper is a trademark of Nantucket Corp.
  239.  
  240.                               CLPMK20.EXE
  241.  
  242.  
  243.         INVOICE
  244.  
  245.         Make checks payable to:
  246.  
  247.         Bill Tansill                            Date:    /    /
  248.         P.O. Box 3196       
  249.         Falls Church, Va. 22043
  250.  
  251.  
  252.  
  253.         Name, address, phone (Please type or print): 
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.         Product                   Quantity   Price Each     Total
  261.  
  262.         CLPMK20 License Fee         ________    @ $15.00     _______
  263.  
  264.  
  265.         Total:                                             _______
  266.  
  267.  
  268.